// Fine.java - 罚金记录实体类
package com.library.entity;

import java.time.LocalDate;

public class Fine {
    private String fineId;
    private String readerId;
    private String recordId;
    private double amount;
    private String reason;
    private LocalDate createDate;
    private LocalDate payDate;
    private FineStatus status;

    public enum FineStatus {
        UNPAID, PAID, WAIVED
    }

    public Fine(String fineId, String readerId, String recordId, double amount, String reason) {
        this.fineId = fineId;
        this.readerId = readerId;
        this.recordId = recordId;
        this.amount = amount;
        this.reason = reason;
        this.createDate = LocalDate.now();
        this.status = FineStatus.UNPAID;
    }

    // Getter和Setter方法
    public String getFineId() { return fineId; }
    public void setFineId(String fineId) { this.fineId = fineId; }

    public String getReaderId() { return readerId; }
    public void setReaderId(String readerId) { this.readerId = readerId; }

    public String getRecordId() { return recordId; }
    public void setRecordId(String recordId) { this.recordId = recordId; }

    public double getAmount() { return amount; }
    public void setAmount(double amount) { this.amount = amount; }

    public String getReason() { return reason; }
    public void setReason(String reason) { this.reason = reason; }

    public LocalDate getCreateDate() { return createDate; }
    public void setCreateDate(LocalDate createDate) { this.createDate = createDate; }

    public LocalDate getPayDate() { return payDate; }
    public void setPayDate(LocalDate payDate) { this.payDate = payDate; }

    public FineStatus getStatus() { return status; }
    public void setStatus(FineStatus status) { this.status = status; }
}
